Package com.cisco.pt.ipc.sim.impl
Class SnmpAgentImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.ProcessImpl
com.cisco.pt.ipc.sim.impl.SnmpAgentImpl
Information provided by the PKI file:
\class SnmpAgent
\brief SnmpAgent holds and manipulates the SNMP agent.
\example network().getDevice("Router0").getProcess("SnmpAgent")
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionSnmpAgentImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommunity(String communityStr, Access access) Information provided by the PKI file:getCommunity(String community) Information provided by the PKI file:getCommunityAt(int index) Information provided by the PKI file:intInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanremoveCommunity(String communityStr) Information provided by the PKI file:voidsetEnabled(boolean enabled) Information provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.sim.impl.ProcessImpl
getOwnerDeviceMethods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.Process
getOwnerDevice
-
Constructor Details
-
SnmpAgentImpl
public SnmpAgentImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
getCommunity
Information provided by the PKI file:
\brief Returns the community with the specified name. \param community, the name of the community of interest. \return pair<string, Access, the community name and access privileges. Access privileges: eAccess_ReadOnly = 0, eAccess_ReadWrite = 1, eAccess_ReadCreate = 2, eAccess_NotAccessible = 3- Specified by:
getCommunityin interfaceSnmpAgent- Parameters:
community- Takes in a parameter of community- Returns:
- Pair<String, Access> Returns a Pair<String, Access>
-
getCommunityAt
Information provided by the PKI file:
\brief Returns the community at the specified name. \param index, the index of the community of interest. \return pair<string, Access, the community name and access privileges. Access privileges: eAccess_ReadOnly = 0, eAccess_ReadWrite = 1, eAccess_ReadCreate = 2, eAccess_NotAccessible = 3- Specified by:
getCommunityAtin interfaceSnmpAgent- Parameters:
index- Takes in a parameter of index- Returns:
- Pair<String, Access> Returns a Pair<String, Access>
-
removeCommunity
Information provided by the PKI file:
\brief Removes the specified community. \param communityStr, the name of the community of interest. \return bool, true if successful, otherwise false.- Specified by:
removeCommunityin interfaceSnmpAgent- Parameters:
communityStr- Takes in a parameter of communityStr- Returns:
- boolean Returns a boolean
-
addCommunity
Information provided by the PKI file:
\brief Adds a community. \param communityStr, the name of the community. \param access, the community name and access privileges. Access privileges: eAccess_ReadOnly = 0, eAccess_ReadWrite = 1, eAccess_ReadCreate = 2, eAccess_NotAccessible = 3 \return bool, true if successful, otherwise false.- Specified by:
addCommunityin interfaceSnmpAgent- Parameters:
communityStr- Takes in a parameter of communityStraccess- Takes in a parameter of access
-
getCommunityCount
public int getCommunityCount()Information provided by the PKI file:
\brief Returns the number of communities. \return int, the number of communities.- Specified by:
getCommunityCountin interfaceSnmpAgent- Returns:
- int Returns a int
-
isEnabled
public boolean isEnabled()Information provided by the PKI file:
\brief Returns true if the SNMP agent is enabled, otherwise false. \return bool, true if the SNMP agent is enabled, otherwise false. -
setEnabled
public void setEnabled(boolean enabled) Information provided by the PKI file:
\brief Enables or disables the SNMP agent. \return enabled, true to enable the SNMP agent, false to disable it.- Specified by:
setEnabledin interfaceSnmpAgent- Parameters:
enabled- Takes in a parameter of enabled
-